<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich"
	template="template.xhtml">
	<ui:define name="body">
		<f:view>
			<h:form id="form1">
				<rich:dataTable id="tbl_versionsResult"
				    	cellpadding="0" cellspacing="0" width="550" 
				      	value="#{addressBookController.addressBookVersions}" var="addressbook">
					<f:facet name="header">
					
					    <rich:columnGroup>
					        <rich:column colspan="2">
                                <h:outputText value="Address Book Revisions" />
					        </rich:column>
					        <rich:column breakBefore="true">
					            <h:outputText value="Name" />
					        </rich:column>
					        <rich:column>
					            <h:outputText value="Email" />
					        </rich:column>
					    </rich:columnGroup>
					</f:facet>

					<rich:column colspan="2">
						<h:panelGrid columns="2">
							<h:outputText value="Title: #{addressbook.title}" style="font-size:12px" />
						</h:panelGrid>
						<hr/>
					</rich:column>

					<rich:subTable value="#{addressbook.contacts}" var="contact">
					    <rich:column>
					        <h:outputText value="#{contact.name}" />
					    </rich:column>
					    <rich:column>
					        <h:outputText value="#{contact.email}" />
					    </rich:column>
					</rich:subTable>
				</rich:dataTable>			
				<a4j:commandButton value="Back" action="addressBooks" style="150px" />                
			</h:form>
		</f:view>		
	</ui:define>
</ui:composition>